<script>
import hccmStore from "@/common/hccm-store.js"
// var mImUtil = require("pages/hccm-patient-manage/utils/m-im-util.js")
// var mChatListener = require("myPages/hccm-chat/utils/m-chat-listener.js")
export default {
  onLaunch: function () {
    // mChatListener.initListener()
    // mImUtil.imInit()

    console.log("App Launch")
    // 设置安全高度a
    let system = uni.getSystemInfoSync()
    let offsetTop
    if (system.platform == "android") {
      offsetTop = (40 + system.statusBarHeight) / (uni.upx2px(100) / 100) / 2
    } else {
      offsetTop = (46 + system.statusBarHeight) / (uni.upx2px(100) / 100) / 2
    }
    console.log(system)
    hccmStore.setOffsetTop(offsetTop)

    uni.getSystemInfo({
      success:(res)=>{
        hccmStore.setOffsetHeight(res.windowHeight)
      }
    })
    
  },
  onLoad(){
    uni.hideTabBar()
  },
  onShow: function () {
    console.log("App Show")
  },
  onHide: function () {
    console.log("App Hide")
  },
}
</script>

<style lang="scss">
/*每个页面公共css */
// @import "uview-ui/index.scss";
@import "./static/css/iconfont/icon.css";
@import "./static/css/main.css";
@import "./static/css/common.css";
html,
body {
  color: $hccm-text-color;
  font-family: $hccm-font-family;
  background: $hccm-background-color;
}
// 富文本宽度
._root > view {
  width: 660rpx !important;
  max-width: 660rpx !important;
}
.wxParse .img {
  width: 700rpx !important;
  max-width: 700rpx !important;
}
.arc-content {
  width: 740rpx !important;
  max-width: 740rpx !important;
}
</style>
